<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/website/common/base.jsp"%>

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>${webname }-我的优惠券</title>
<%@ include file="/website/common/common.jsp"%>
<link href="${webctx }/css/manage.css" rel="stylesheet" type="text/css" />
</head>

<body>
<%@ include file="/website/common/top.jsp"%>
<%@ include file="/website/common/head.jsp"%>
<%@ include file="/website/common/menu.jsp"%>

<div class="warp-body" style="background-color: #fff;">
    <div style="width: 100%; height: 3px; background-color: #0daeff;"></div>
	<div class="inner clearfix">
    	<div class="left-main">
        	<div class="left-inner">
            	<%@ include file="/website/user/left.jsp"%>
            </div>
        </div>
    	<div class="right-main">
        	<div class="right-inner">
            	<div class="right-title"><span></span>我的优惠券</div>
            	<div class="inte-head">
                	<div class="text-box jf">
                    	<span><img src="${webctx }/images/icon46x46-2.png" /></span>
                        <p><em>${count }张</em></p>
                        <p class="txt">优惠券</p>
                    </div>
                    <div class="text-box zq">
                    	<span><img src="${webctx }/images/icon46x46-1.png" /></span>
                        <p><em>${user.integral + user.ly_integral}</em></p>
                        <p class="txt">可用积分</p>
                    </div>
                    <a href="${ctx }/user/integral" class="inte-btn">查看积分</a>
                </div>
                <div class="inte-main mt-10">
                	<div class="youhuiquan-inner">
                        <div class="tab-container" id="J_tab_info">
                            <div class="tab-con-hd">
                                <ul class="tab-con-nav">
                                    <li class="cur" state="1">未使用</li>
                                    <li state="2">已使用</li>
                                    <li state="3">已过期</li>
                                </ul>
                            </div>
                            <div class="tab-con-bd">                
                                <div class="tab-con-bd-item" id="tab-con-bd-item"> 
                                	
                                </div>
                                
                            </div>
                        </div>
                    </div>
                    
                </div>
            </div>
        </div>
    </div>
</div>

<%@ include file="/website/common/foot.jsp"%>
</body>
</html>
<script>
var uploader;
$(function(){
	setLeftCur("couponList");
	
	loadlist(1,1);
	
	$(".tab-con-nav li").click(function(){
		$(".tab-con-nav li").removeClass("cur");
		$(this).addClass("cur");
		loadlist($(this).attr("state"),1);
		
	})
})
function loadlist(state,pno){
	$w.loadPanel(apiroot+"/coupon/list?pno="+pno+"&state="+state,{},"tab-con-bd-item");
}
function gopage(n){
	loadlist($(".tab-con-nav li.cur").attr("state"),n);
}
function topageclick(){
	if($("[name='topagenum']").val()!="")
		loadlist($(".tab-con-nav li.cur").attr("state"),$("[name='topagenum']").val());
}

function addCoupon(){
	if($("[name='couponcode']").val()==''){
		alert("请输入优惠劵号");
		return;
	}
}
</script>